at (someone's) wits' end

Translations
au bout du rouleau
Definitions
To be so worried, confused, or annoyed by something that you do not know what to do next; to have no more patience, ideas, or solutions left.